package com.example.Housekeeping.service.impl;

import com.example.Housekeeping.domain.HouseOrder;
import com.example.Housekeeping.domain.Vo.HouseOrderVo;
import com.example.Housekeeping.mapper.HouseOrderMapper;
import com.example.Housekeeping.service.IHouseOrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class HouseOrderServiceImpl implements IHouseOrderService {
    @Autowired
    private HouseOrderMapper houseOrderMapper;

    /**
     * 查询家政订单
     *
     * @param houseOrder
     * @return
     */
    @Override
    public List<HouseOrderVo> selectHouseOrder(HouseOrder houseOrder) {
        return houseOrderMapper.selectHouseOrder(houseOrder);

    }

    /**
     * 根据账号查询家政订单
     *
     * @param houseOrder
     * @return
     */
    @Override
    public List<HouseOrderVo> getHouseOrderByAccount(HouseOrder houseOrder) {
        return houseOrderMapper.getHouseOrderByAccount(houseOrder);

    }

    /**
     * 新增订单
     *
     * @param houseOrder
     */

    @Override
    public  void addHouseOrder(HouseOrder houseOrder) {
        houseOrderMapper.addHouseOrder(houseOrder);
    }

    /**
     * 修改订单
     *
     * @param houseOrder
     */
    @Override
    public void updateHouseOrderById(HouseOrder houseOrder) {
        houseOrderMapper.updateHouseOrderById(houseOrder);
    }

    /**
     * 删除订单
     *
     * @param houseOrder
     */
    @Override
    public void delHouseOrderById(String houseOrder) {
        houseOrderMapper.delHouseOrderById(houseOrder);
    }

//    @Override
//    public houseOrder selectOneHouseOrder(HouseOrder houseOrder) {
//        return houseOrderMapper.selectOneHouseOrder(houseOrder);
//    }
//
//    @Override
//    public houseOrder selectByHouseOrderId(Integer orderId) {
//        HouseOrder houseOrder = houseOrderMapper.selectByHouseOrderId(orderId);
//        return houseOrder;
//    }

}
